<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var arr=[24,17,45,38,20];
    var arr1=[];
    for(i=0;i<arr.length;i++){
        if(arr[i]>30){
            arr1.push(arr[i])
        }
        
    }
    document.write(arr1)
    console.log(arr1);
    document.write("<br>")
    arr.splice(2,0,36)
    document.write(arr)
    arr.splice(4,1)
    console.log(arr);
    
    
</script>